<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
  <head>
  	<link rel="stylesheet" type="text/css" href="<c:url value='/css/Pub.css'/>"></link>
  	<script type="text/javascript" src="<c:url value='/js/login.js'/>"></script>
  	<script type="text/javascript">
  		var path = "<c:url value='/'/>";//项目的根/book
  	</script>
  	<!-- 多写了两个才会出现两个按钮叠加的效果 -->
  	
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
  <link rel="stylesheet" href="${pageContext.request.contextPath}/easyui/themes/default/easyui.css" type="text/css"></link>
  <link rel="stylesheet" href="${pageContext.request.contextPath}/easyui/themes/icon.css" type="text/css"></link>
  <script type="text/javascript" src="${pageContext.request.contextPath}/easyui/jquery.min.js"></script>
  <script type="text/javascript" src="${pageContext.request.contextPath}/easyui/jquery.easyui.min.js"></script>
  
  	<style type="text/css">
  		table{
  			font-size:10pt;
  			width:330px;
  		}
  		.txt{
  			border:0px;
  			border-bottom:1px solid blue;
  			width:200px;
  		}
  		td{
  			padding:5px;
  		}
  	</style>
  	
  	
  	</head>
  <body style="text-align:center;">
	
  		<br/><br/>
  		<font color="red">${msg }</font>
  		<form name="f1" method="post" action="${pageContext.request.contextPath}/user?action=login" onsubmit="return validate()" target="_parent">
  		<table>
			  <tr style="background:#87CEFF;">
			  	<td colspan="2" align="center">
			  		用户登录
			  	</td>
			  </tr>
			  <tr>
			  	<td>
			  		姓名<font color="red">*</font>：
			  	</td>
			  	<td>
			  		<input id="name"  type="text" name="name"
					class="easyui-validatebox" data-options="required:true,
					missingMessage:'姓名必填' " />
						
			  	</td>
			   <font color="red"><span id="name"></span></font>
			  </tr>	
			   <tr>
			  	<td>
			  		密码<font color="red">*</font>：
			  	</td>
			  
			  	<td>
			  		<input id="password"  type="password" name="password"
					class="easyui-validatebox" data-options="required:true,missingMessage:'密码必填'"/>
			  	</td>
			  </tr>	
			  <tr>
			  	<td>
			  		验证码<font color="red">*</font>：
			  	</td>
			  
			  		<td style="width:100px;">
					<input name="sCode" type="text"
					class="easyui-validatebox" data-options="required:true,
					missingMessage:'验证码必填' "/>
					</td>
						<td>
			  		<img id="imgCode" onclick="changeValidate();"src="${pageContext.request.contextPath }/codeImage" title="看不清楚换一张"></img>
			  	</td>
			  </tr>
			  <tr>
			  	<td id="msg" colspan="2" style="color:red;" align="center">
			  	</td>
			  </tr>
			  <tr >
			  	<td colspan="2" align="center">
			  		<input type="submit" class="OperBtn" value="登录" style="margin:5px;color:#6495ED;"/>
			  		<input type="reset" class="OperBtn" style="margin: 5px;color:#6495ED" value="取消">
			  		<br />
			  		<a class="easyui-linkbutton" data-options="iconCls:'icon-add'" href="${pageContext.request.contextPath }/jsp/front/user/reg.jsp">现在去注册一个新用户</a>
			  	</td>
			  </tr>	
  		</table>
  		</form>	
  </body>
  <script type="text/javascript">
	//检查验证码
  		function changeValidate(){
  		var ran=Math.random();
  		document.getElementById('imgCode').src = 
  		"${pageContext.request.contextPath }/codeImage?t="+ran; 
  		
  		}
  	</script>
  	
  	
	
</html>
  		
